package com.google.code.gronono.commons.observable;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

/**
 * Interface définissant les méthodes permettant l'implémentation du pattern Observable.
 *
 * @author Arnaud BRUNET
 */
public interface IObservable {

	/**
	 * @see PropertyChangeSupport#addPropertyChangeListener(PropertyChangeListener)
	 */
	public void addPropertyChangeListener(PropertyChangeListener listener);

	/**
	 * @see PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener)
	 */
	public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);

	/**
	 * @see PropertyChangeSupport#getPropertyChangeListeners()
	 */
	public PropertyChangeListener[] getPropertyChangeListeners();

	/**
	 * @see PropertyChangeSupport#getPropertyChangeListeners(String)
	 */
	public PropertyChangeListener[] getPropertyChangeListeners(String propertyName);

	/**
	 * @see PropertyChangeSupport#hasListeners(String)
	 */
	public boolean hasListeners(String propertyName);

	/**
	 * @see PropertyChangeSupport#removePropertyChangeListener(PropertyChangeListener)
	 */
	public void removePropertyChangeListener(PropertyChangeListener listener);

	/**
	 * @see PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener)
	 */
	public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);

}
